<template>
	<div class="login-container">
		<div class="h1">
			<div class="h1img"><img src="../../images/gh.png" /></div>
			<div class="h1title">{{ globalTitle }}</div>
		</div>
		<div class="w3layouts">
			<div class="signin-agile">
				<RegPage v-if="!isReg"></RegPage>
				<div v-else-if="!isScan">
					<Account v-show="isTabPaneShow" />
				</div>
				<Scan v-else />
				<div class="login-content-main-sacn" @click="isScan = !isScan" v-if="isReg">
					<i class="iconfont" :class="isScan ? 'icon-diannao1' : 'icon-barcode-qr'"></i>
					<div class="login-content-main-sacn-delta"></div>
				</div>
				<div class="content-left" style="position: absolute; right: 0px; bottom: 0px"></div>
			</div>
			<div class="signup-agileinfo" style="display: none">
				<h3>告知书</h3>
				<div class="content-left" style="position: absolute; right: 0px; top: 0px"></div>
				<p>如果您第一次使用系统，请确认您的用户名密码是否存在，如有疑问，请联系管理员：139978655532。</p>
				<p>如您对系统不熟悉，请先阅读操作手册。</p>
				<p>关于拍照和电子签名，必须安装的相关硬件。</p>
				<div class="more">
					<a class="book popup-with-zoom-anim button-isi zoomIn animated" data-wow-delay=".5s" href="#small-dialog">打开操作手册</a>
				</div>
			</div>
			<div class="clear"></div>
		</div>
		<div class="footer-w3l">
			<p class="agileinfo">Copyright 2020 - 2024 hennda. All Rights Reserved</p>
		</div>
	</div>
</template>

<script lang="ts">
import { toRefs, reactive } from 'vue';
import { mapState } from 'vuex'; 
import Account from '/@/views/login/component/account.vue';
import Scan from '/@/views/login/component/scan.vue';
import RegPage from '/@/views/login/component/reg.vue';

export default {
	name: 'login',
	components: { Account, Scan , RegPage},
	setup() {
		const state = reactive({
			tabsActiveName: 'account',
			isTabPaneShow: true,
			isScan: false,
		});
		// 切换密码、手机登录
		const onTabsClick = () => {
			state.isTabPaneShow = !state.isTabPaneShow;
		};
		return {
			onTabsClick,
			...toRefs(state),
		};
	},
	computed:mapState({
		// 获取布局配置信息
		globalTitle:function(state:any){return state.themeConfig.themeConfig.globalTitle;},
		//是否已注册
		isReg:function(state:any){return state.reginfo.reginfo.isReg;}
	})
};
</script>
<style lang="scss" scoped>
.login-container {
	border: 0px solid #fff;
	width: 100%;
	height: 100%;
	background: url('../../images/1.jpg') no-repeat 0px 0px;
	background-size: cover;
	font-family: 'Open Sans', sans-serif;

	.login-content-main-sacn {
		position: absolute;
		top: 0;
		right: 0;
		width: 50px;
		height: 50px;
		overflow: hidden;
		cursor: pointer;
		transition: all ease 0.3s;
		&-delta {
			position: absolute;
			width: 35px;
			height: 70px;
			z-index: 2;
			top: 2px;
			right: 21px;
			background: var(--el-color-white);
			transform: rotate(-45deg);
		}
		&:hover {
			opacity: 1;
			transition: all ease 0.3s;
			color: var(--color-primary);
		}
		i {
			width: 47px;
			height: 50px;
			display: inline-block;
			font-size: 48px;
			position: absolute;
			right: 2px;
			top: -1px;
		}
	}
}

.h1 {
	font-family: Helvetica, ‘Hiragino Sans GB‘, ‘Microsoft Yahei‘, ‘微软雅黑‘, Arial, sans-serif;
	font-size: 35px;
	color: #fff;
	text-align: center;
	border: 0px solid red;
	padding: 60px 0 80px 0;
}
.h1 .h1img {
	display: inline-block;
	vertical-align: middle;
	margin-right: 10px;
}

.h1 .h1title {
	display: inline-block;
}
.w3layouts {
	width: 35%;
	margin: 0 auto;
	height: 440px;
	border: 0px solid red;
}
.signin-agile {
	width: 100%;
	float: left;
	background: rgba(250, 240, 230, 0.1);
	padding: 0 80px 80px 80px;
	transition: 0.5s all !important;
	-webkit-transition: 0.5s all !important;
	-moz-transition: 0.5s all;
	-o-transition: 0.5s all;
	-ms-transition: 0.5s all;
	height: 440px;
	position: relative;
}

.signin-agile:hover {
	background: rgba(250, 240, 230, 0.5);
}

.signin-agile h2,
.signup-agileinfo h3 {
	font-size: 25px;
	color: rgb(3, 56, 122);
	margin-bottom: 20px;
}
.signup-agileinfo {
	background: rgba(3, 56, 122, 0.76);
}
.signup-agileinfo h3 {
	color: #fff;
}
.signup-agileinfo p {
	color: #fff;
	font-size: 14px;
	line-height: 30px;
}
.login-content-main-sacn i {
	width: 47px;
	height: 50px;
	display: inline-block;
	font-size: 48px;
	position: absolute;
	right: 2px;
	top: -1px;
}
.icon-barcode-qr:before {
	content: '\e61e';
}

.login-content-main-sacn-delta {
	position: absolute;
	width: 35px;
	height: 70px;
	z-index: 2;
	top: 2px;
	right: 21px;
	background: red;
	transform: rotate(-45deg);
}

.content-left {
	width: 6.2rem;
	height: 5.8rem;
	/*border: 1px solid red;*/
	background: url('../../images/d.png') no-repeat;
	background-size: 100% 100%;
	padding: 0.4rem 0;
	box-sizing: border-box;
	margin-right: 2%;
	float: left;
}

@-webkit-keyframes rotation {
	from {
		-webkit-transform: rotate(0deg);
	}
	to {
		-webkit-transform: rotate(360deg);
	}
}

.content-left {
	-webkit-transform: rotate(360deg);
	animation: rotation 15s linear infinite;
	-moz-animation: rotation 15s linear infinite;
	-webkit-animation: rotation 15s linear infinite;
	-o-animation: rotation 15s linear infinite;
}

input[type='text'],
input[type='password'] {
	width: 93.5%;
	padding: 15px;
	border: 1px solid #7d7d7d;
	outline: none;
	font-size: 14px;
	margin-bottom: 20px;
	border-radius: 25px;
}
form ul {
	float: left;
}
ul li {
	list-style: none;
	display: inline-block;
}

form a {
	color: #7d7d7d;
	float: right;
	font-size: 14px;
}
input[type='button'] {
	background: #ffffff;
	padding: 13px 0;
	font-size: 16px;
	color: black;
	cursor: pointer;
	outline: none;
	transition: 0.5s all;
	-webkit-transition: 0.5s all;
	-moz-transition: 0.5s all;
	-o-transition: 0.5s all;
	-ms-transition: 0.5s all;
	width: 100%;
	border: none;
	margin-top: 25px;
	border-radius: 25px;
}

input[type='button']:hover {
	background: #081148;
}
.footer-w3l {
	margin: 120px 0 15px 0;
}
.footer-w3l p {
	font-size: 14px;
	text-align: center;
	color: #fff;
	line-height: 27px;
}
.footer-w3l p a {
	color: #fff;
}
.footer-w3l p a:hover {
	text-decoration: underline;
}

/*--pop-up--*/
a.book.popup-with-zoom-anim.button-isi.zoomIn.animated {
	border: 1px solid #fff;
	padding: 8px 34px;
	color: #fff;
	display: inline-block;
	margin-top: 35px;
	border-radius: 20px;
	transition: 0.5s all;
	-webkit-transition: 0.5s all;
	-moz-transition: 0.5s all;
	-o-transition: 0.5s all;
	-ms-transition: 0.5s all;
	outline: none;
}
a.book.popup-with-zoom-anim.button-isi.zoomIn.animated:hover {
	border: 1px solid #0c1558;
	color: #fff;
	background: #0c1558;
}
.book-form {
	padding: 2em;
}
.book-form h3 {
	font-size: 1.8em;
	text-align: left;
	color: #7d7d7d;
	margin-bottom: 1.5em;
}
/*-- //pop-up --*/

/*-- Responsive --*/
@media screen and (max-width: 1440px) {
	.signin-agile,
	.signup-agileinfo {
		padding: 73px;
	}
	input[type='text'],
	input[type='password'] {
		width: 91%;
	}
}
@media screen and (max-width: 1366px) {
	.signin-agile,
	.signup-agileinfo {
		padding: 70px;
	}
	input[type='text'],
	input[type='password'] {
		width: 90.5%;
	}
}
@media screen and (max-width: 1280px) {
	.w3layouts {
		width: 75%;
		margin: 0 auto;
	}
}
@media screen and (max-width: 1080px) {
	.w3layouts {
		width: 80%;
		margin: 0 auto;
	}
	.signin-agile,
	.signup-agileinfo {
		padding: 63px;
	}
}
@media screen and (max-width: 1024px) {
	h1 {
		margin: 50px 0px 56px 0px;
	}
	.signin-agile,
	.signup-agileinfo {
		padding: 60px;
	}
	input[type='text'],
	input[type='password'] {
		width: 89%;
	}
	.footer-w3l {
		margin: 80px 0 15px 0;
	}
}
@media screen and (max-width: 991px) {
	.w3layouts {
		width: 85%;
		margin: 0 auto;
	}
}
@media screen and (max-width: 966px) {
}
@media screen and (max-width: 900px) {
	.signin-agile,
	.signup-agileinfo {
		padding: 55px;
	}
	input[type='text'],
	input[type='password'] {
		width: 88%;
	}
}
@media screen and (max-width: 800px) {
	.signin-agile,
	.signup-agileinfo {
		padding: 49px;
	}
	input[type='text'],
	input[type='password'] {
		width: 87%;
	}
}
@media screen and (max-width: 768px) {
	.w3layouts {
		width: 90%;
		margin: 0 auto;
	}
	.signin-agile,
	.signup-agileinfo {
		padding: 50px;
	}
	ul li input[type='checkbox'] + label {
		font-size: 13px;
	}
	form a {
		font-size: 13px;
	}
}
@media screen and (max-width: 736px) {
	.signin-agile,
	.signup-agileinfo {
		padding: 48px;
	}
}
@media screen and (max-width: 667px) {
	h1 {
		margin: 30px 0px 45px 0px;
	}
	.w3layouts {
		width: 95%;
		margin: 0 auto;
	}
	.signin-agile,
	.signup-agileinfo {
		padding: 46px;
	}
	input[type='text'],
	input[type='password'] {
		padding: 12px;
	}
	input[type='submit'] {
		padding: 12px 0;
	}
	.my-mfp-zoom-in.mfp-ready #small-dialog {
		padding: 30px !important;
	}
}
@media screen and (max-width: 640px) {
	.signin-agile,
	.signup-agileinfo {
		padding: 44px;
	}
	.signup-agileinfo p {
		font-size: 13.5px;
		line-height: 27px;
	}
}
@media screen and (max-width: 600px) {
	.w3layouts {
		width: 85%;
		margin: 0 auto;
	}
	.signin-agile,
	.signup-agileinfo {
		width: 82%;
	}
	input[type='text'],
	input[type='password'] {
		width: 93%;
	}
}
@media screen and (max-width: 568px) {
	h1 {
		font-size: 35px;
		margin: 35px 0px 50px 0px;
	}
	.footer-w3l {
		margin: 40px 0 15px 0;
	}
}
@media screen and (max-width: 480px) {
	.signin-agile,
	.signup-agileinfo {
		width: 77%;
	}
	input[type='text'],
	input[type='password'] {
		width: 92%;
	}
	.footer-w3l p {
		font-size: 13px;
	}
}
@media screen and (max-width: 414px) {
	h1 {
		font-size: 28px;
		margin: 35px 0px 40px 0px;
	}
	.signin-agile,
	.signup-agileinfo {
		width: 74%;
	}
	input[type='text'],
	input[type='password'] {
		width: 89%;
	}
	form a {
		margin-top: 3px;
	}
	.signup-agileinfo {
		height: 240px;
	}
}
@media screen and (max-width: 384px) {
	h1 {
		font-size: 30px;
		margin: 35px 0px 40px 0px;
	}
	.signin-agile,
	.signup-agileinfo {
		width: 77%;
		padding: 35px;
	}
	a.book.popup-with-zoom-anim.button-isi.zoomIn.animated {
		padding: 5px 25px;
		font-size: 13px;
		margin-top: 25px;
	}
}
@media screen and (max-width: 375px) {
	.signin-agile,
	.signup-agileinfo {
		width: 80%;
		padding: 30px;
	}
	.book-form h3 {
		font-size: 1.5em;
	}
}
@media screen and (max-width: 320px) {
	h1 {
		font-size: 27px;
		margin: 35px 0px 30px 0px;
	}
	.signin-agile,
	.signup-agileinfo {
		width: 84%;
		padding: 20px;
	}
	.signin-agile h2,
	.signup-agileinfo h3 {
		font-size: 20px;
	}
	input[type='text'],
	input[type='password'] {
		padding: 10px;
	}
	input[type='submit'] {
		padding: 10px 0px;
	}
	ul li input[type='checkbox'] + label span:first-child {
		width: 10px;
		height: 10px;
		top: 3px;
	}
	ul li input[type='checkbox'] + label {
		font-size: 12px;
		padding-left: 20px;
	}
	form a {
		font-size: 12px;
		margin-top: 4px;
	}
	a.book.popup-with-zoom-anim.button-isi.zoomIn.animated {
		margin-top: 30px;
	}
	.signup-agileinfo p {
		font-size: 12.5px;
	}
}
</style>
